Introduction to R resources and GitHub and data exercise

Tanzanian HCES Analysis and TFNC Training

Liberty Mlambo

University of Nottingham

1 R, RStudio and GitHub

1.1 R and Rstudio

  • R is a free software environment for statistical computing and graphics
  • Rstudio is a integrated development environment (IDE) for R and Python.
    • open source and commercial editions (Windows, Mac, and Linux)

    • includes a console

    • syntax-highlighting editor

    • direct code execution.

    • tools for plotting

    • viewing history

    • debugging

    • managing your workspace

2 Git

2.1 Git

Open source

Tracks file changes

Branch based non-linear workflows (we can all work at the same time)

Rstudio IDE intergration

Speed of work (for quick homework assistance)

Local environment

3 GitHub

GitHub is a web-based interface that uses Git, to let multiple people work and make changes on a project concurrently

3.1 Fremium Repository based

  • Repository based (Projects)

3.2 Built-in security

3.3 File History Tracking

3.4 Unlimited Public/ Private Repositories

3.5 Track issues and task progress

3.6 Track issues and task progress

4 Practical Assumptions

  • Computer (Mac, Windows, Linux, etc..) with administrative privileges
  • Software download and installation experience

5 Practical Requirements

  • GitHub account
  • Rstudio
  • Git

6 Excercise 1 : GitHub sign-up

GitHub signup –>

7 Excercise 2 : R download and installation

R download

8 Excercise 3 : Rstudio download and installation

Rstudio

9 Excercise 4 : Git download and installation

9.1 Git

# Excercise 5 - RStudio and Git connection (bonus)

  • In Rstudio console type :usethis::create_github_token()
  • In your github account: give your token a name,generate and copy it.
  • In Rstudio console type: gitcreds::gitcreds_set()
  • In Rstudio console paste the token
  • In Rstudio terminal: git config user.name "YourGitHubUsername"
  • In Rstudio terminal: git config user.email "YourGitHubEmail@here.com"

10 Additional Resources

11 Questions?